#include <algorithm>
#include <vector>
#include <cmath>
#include <iostream>
#include <cstring>
#include <cstdio>
#include <set>
#include <map>
#include <cstdlib>
#define LL long long
#define ldb long double
const ldb eps = 1e-9;
const ldb pi = fabsl(atan2(0.0, -1.0));
const int INF = 0x7f7f7f7f;
const LL LINF = 1ll << 60;
const ldb LDINF = 1e42;
#define nextLine() {int c = 0; while ((c = getchar()) != 10 && c != EOF);}
#define fill(a, c) memset(a, c, sizeof a)
#define debug(a) cerr << #a << " " << a;
#define addEdge(a, b) next[edges] = first[a]; first[a] = edges; end[edges] = b; edges++;
using namespace std;

int n, m, k;
int x[110], y[110];

void Load()
{
	cin >> n >> m >> k;
	for (int i = 0; i < k; i++)
	{
		cin >> x[i] >> y[i];
	}
}

void Solve()
{
	int i, j, l;
	int mindst = 90;
	for (i = 0; i < k; i++)
	{
		mindst = min(mindst, x[i] - 1);	
		mindst = min(mindst, y[i] - 1);
		mindst = min(mindst, n - x[i]);
		mindst = min(mindst, m - y[i]);
	}
	if (mindst <= 4)
	{
		cout << "YES";
	}
	else cout << "NO";
}

int main()
{
	#ifndef ONLINE_JUDGE
	freopen("input.txt", "rt", stdin);
	freopen("output.txt", "wt", stdout);
	#endif
	Load();
	Solve();
	return 0;
}